package com.satan.novel.config.annotation;

import com.satan.novel.common.constant.ErrorCodeEnum;

import java.lang.annotation.*;

/**
 * @author Demon
 * @date 2024/1/31
 * @Description: 分布式锁 注解
 */
@Documented
@Retention(RetentionPolicy.RUNTIME)
@Target(ElementType.METHOD)
public @interface Lock {
    String prefix();

    boolean isWait() default false;

    long waitTime() default 3L;

    ErrorCodeEnum failCode() default ErrorCodeEnum.OK;
}
